<?php
	$yhendus=new mysqli("localhost", "if13", "ifikad", "if13_seppkr");
	$kask=$yhendus->prepare("SELECT COUNT(*), tehnik FROM parandused WHERE valmis = 0 GROUP BY tehnik;");
	$kask->bind_result($COUNT, $tehnik);
	$kask->execute();
?>
<!doctype html>
<html>
<table border="1">
	<caption><b>Tegemata tööd</b></caption>
		<tbody>
		<?php
			while($kask->fetch()){
				echo"<td>".htmlspecialchars($tehnik)."</td>";
				echo"<td>".htmlspecialchars($COUNT)."</td>";
			}
		?>
	</tbody>
</html>
<?php
	$yhendus->close();
?>